﻿CREATE PROCEDURE [dbo].[proc_Finance_Balance_GetItem]
	(
		@GId uniqueidentifier
	)
AS
	Select
		Id,
		GId,
		Prices,
		TypeId,
		(select FA.title from Finance_AccountsType FA where FA.id = typeid) as Type,
		Reason,
		CurrentDate,
		CreateUser,
		CreateDate,
		CompanyId,
		(Select CompanyName From Company Where Id=Finance_Balance.CompanyId) As CompanyName,
		PaymentTypeId,
		BankId,
		(Select Title From Finance_Bank_Type Where Id=Finance_Balance.PaymentTypeId) As PaymentType,
		(Select OpenBank From Finance_Bank Where Id=Finance_Balance.BankId) As Bank
	From Finance_Balance Where GId=@GId
	RETURN
